<script setup lang="ts">
const active = ref(0);
const router = useRouter()
watch(active, (val) => {
  router.push(`/${val}`)
})
</script>

<template>
  <router-view/>
  <van-tabbar v-model="active">
    <van-tabbar-item name="message" icon="home-o">消息</van-tabbar-item>
    <van-tabbar-item name="video" icon="search">视频</van-tabbar-item>
    <van-tabbar-item name="linkman" icon="friends-o">联系人</van-tabbar-item>
    <van-tabbar-item name="space" icon="setting-o">动态</van-tabbar-item>
  </van-tabbar>
</template>

<style scoped>

</style>